<% client = Client.find_by_id(params[:client_id]) %><h1>Lista contratti <%= link_to client.name_or_society, client if params[:client_id] %></h1>
<% if params[:client_id] %>
	<%= link_to('Nuovo contratto', { :controller => "contracts", :action => "new", :id => params[:client_id] }) %>
<% else %>
	<%= link_to 'In scadenza', { :action => "expired" } %>
<% end %>
<br /><br />
<% if @contracts.empty? %>
	<p>Nessun contratto</p>
<% else %>
	<%= render :partial => 'list', :object => @contracts %>
<% end %>
